from typing import Optional

from sqlmodel import SQLModel, Field


class SysRoleMenu(SQLModel, table=True):
    __tablename__ = "sys_role_menu"
    __table_args__ = {'extend_existing': True, 'comment': '角色菜单关系表'}
    role_id: Optional[int] = Field(primary_key=True, description="角色序号",
                                   sa_column_kwargs={"comment": "角色序号"})
    menu_id: Optional[int] = Field(primary_key=True, description="菜单序号",
                                   sa_column_kwargs={"comment": "菜单序号"})
